<%
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
include("/pages/template/head.html"){}
%>
<script type="text/javascript">
    var oper = {
        save:function(id){
            if(!validForm()) {
                return false;
            }
            id = id || '0';
            var url = 'system/customerinfo/save/'+id;
            form1.action = url;
            form1.submit();
            return true;
        }
    };

</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal"
	  role="form" >
	<input type="hidden" name="model.customerId" value="${model.customerId}" />

	<table class="table">
		<% // 列表头部 %>
	<!--	<tr>
			<td>部门</td>
			<td>
				<select name="model.departid" class="form-control" valid="vselect" validname="部门">
					<option value="-1">--请选择--</option>
					${departSelect}
				</select>
			</td>
		</tr>-->
		<tr>
			<td>客户名称</td>
			<td>
				<input class="form-control" type="text" name="model.customerName"
					   value="${model.customerName}" valid="vtext" validname="客户名称" />
			</td>
		</tr>
		<tr>
			<td>公司名称</td>
			<td>
				<input class="form-control" type="text" name="model.companyName"
					   value="${model.companyName}" valid="vtext" validname="公司名称"  />
			</td>
		</tr>
		
		
		<tr>
			<td>联系人</td>
			<td>
				<input class="form-control" type="text" name="model.linkMan" value="${model.linkMan}"  valid="vtext"  />
			</td>
		</tr>
		<tr>
			<td>联系电话</td>
			<td>
				<input class="form-control" type="text" name="model.tel" value="${model.tel}"  valid="vtext"  />
			</td>
		</tr>
		<tr>
			<td>联系邮箱</td>
			<td>
				<input class="form-control" type="text" name="model.email" value="${model.email}"  valid="vtext"  />
			</td>
		</tr>
		<tr>
			<td>appkey</td>
			<td>
				<input class="form-control" type="text" name="model.backward_pKey" value="${model.backward_pKey}"  valid="vtext"  />
			</td>
		</tr>
		<tr>
			<td>私钥</td>
			<td>
				<input class="form-control" type="text" name="model.backward_secret" value="${model.backward_secret}" valid="vtext" />
			</td>
		</tr>
		<tr>
			<td>信用额度</td>
			<td>
				<input class="form-control" type="text" name="model.creditAmount" value="${model.creditAmount}"  valid="vtext"  />
			</td>
		</tr>
		<tr>
			<td>预警额度</td>
			<td>
				<input class="form-control" type="text" name="model.warnAmount" value="${model.warnAmount}" valid="vtext" />
			</td>
		</tr>
	</table>

	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
		<div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
			<button class="btn btn-primary" onclick="oper.save(${model.userid!'0'});return false;">保 存</button>
			<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
		</div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>